﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>测试拖动</title>
    <script src="../XEngine/LineUtil.js"></script>
    <script src="../XEngine/XEngine.js"></script>
    <script src="../XEngine/XSVG.js"></script>
    <script src="../XEngine/XNode.js"></script>
    <script src="../XWorkflow/XWFActivity.js"></script>
    <script src="../XWorkflow/XDesigner.js"></script>

    <script type="text/javascript">
        var id = 0;
        window.onload = function () {
            var designer = new XDesigner();
            designer.init(document.getElementById('designer'));
            designer.addActivity(10, 10, 50, 50, new XWFProcess('abc1'));
            designer.addActivity(10, 110, 50, 50, new XWFProcess('abc2'));
            designer.addActivity(10, 210, 50, 50, new XWFProcess('abc3'));
            designer.event('SelectedElementChanged', onSelectedChanged);
        }

        function onSelectedChanged(element) {
            document.getElementById('debug').innerHTML = "element:" + element.getName();
        }

        window.onmousedown = function (e) {
        }
    </script>
</head>
<body>
    <h1>测试拖动</h1>
    <div id="debug"></div>
    <div id="designer" style="width:100%; height:600px; background:gray">

    </div>
</body>
</html>
